package com.bigShen.mybatis.official.entity;

import java.io.*;
import java.math.BigDecimal;

public class InstrumentInfo extends InstrumentInfoKey implements Cloneable, Serializable{

    private String currency;

    private String iName;

    private String pType;

    private String pClass;

    private String pLs;

    private String mtrDate;

    private String term;

    private String uICode;

    private String uAType;

    private String uMType;

    private Short couponType;

    private Short issueMode;

    private String paymentFreq;

    private Short cashTimes;

    private String seniority;

    private Integer partyId;

    private String chinesespell;

    private String updateUser;

    private String updateTime;

    private String accountUser;

    private String accountTime;

    private BigDecimal parValue;

    private String fwdIrc;

    private String disIrc;

    private BigDecimal coupon;

    private String previousVersionMtrDate;

    private String grpId;

    private Short termDay;

    private Short remainTermDay;

    private String warrantorId;

    private BigDecimal issueVolume;

    private BigDecimal issuerId;

    private BigDecimal iId;

    private String state;

    private String bActualMtrDate;

    private String qCurrency;

    private String isSpvAsset;

    private String realICode;

    private String startDate;

    private BigDecimal principal;

    private String firstPaymentDate;

    private String daycount;

    private String matchCode;

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency == null ? null : currency.trim();
    }

    public String getiName() {
        return iName;
    }

    public void setiName(String iName) {
        this.iName = iName == null ? null : iName.trim();
    }

    public String getpType() {
        return pType;
    }

    public void setpType(String pType) {
        this.pType = pType == null ? null : pType.trim();
    }

    public String getpClass() {
        return pClass;
    }

    public void setpClass(String pClass) {
        this.pClass = pClass == null ? null : pClass.trim();
    }

    public String getpLs() {
        return pLs;
    }

    public void setpLs(String pLs) {
        this.pLs = pLs == null ? null : pLs.trim();
    }

    public String getMtrDate() {
        return mtrDate;
    }

    public void setMtrDate(String mtrDate) {
        this.mtrDate = mtrDate == null ? null : mtrDate.trim();
    }

    public String getTerm() {
        return term;
    }

    public void setTerm(String term) {
        this.term = term == null ? null : term.trim();
    }

    public String getuICode() {
        return uICode;
    }

    public void setuICode(String uICode) {
        this.uICode = uICode == null ? null : uICode.trim();
    }

    public String getuAType() {
        return uAType;
    }

    public void setuAType(String uAType) {
        this.uAType = uAType == null ? null : uAType.trim();
    }

    public String getuMType() {
        return uMType;
    }

    public void setuMType(String uMType) {
        this.uMType = uMType == null ? null : uMType.trim();
    }

    public Short getCouponType() {
        return couponType;
    }

    public void setCouponType(Short couponType) {
        this.couponType = couponType;
    }

    public Short getIssueMode() {
        return issueMode;
    }

    public void setIssueMode(Short issueMode) {
        this.issueMode = issueMode;
    }

    public String getPaymentFreq() {
        return paymentFreq;
    }

    public void setPaymentFreq(String paymentFreq) {
        this.paymentFreq = paymentFreq == null ? null : paymentFreq.trim();
    }

    public Short getCashTimes() {
        return cashTimes;
    }

    public void setCashTimes(Short cashTimes) {
        this.cashTimes = cashTimes;
    }

    public String getSeniority() {
        return seniority;
    }

    public void setSeniority(String seniority) {
        this.seniority = seniority == null ? null : seniority.trim();
    }

    public Integer getPartyId() {
        return partyId;
    }

    public void setPartyId(Integer partyId) {
        this.partyId = partyId;
    }

    public String getChinesespell() {
        return chinesespell;
    }

    public void setChinesespell(String chinesespell) {
        this.chinesespell = chinesespell == null ? null : chinesespell.trim();
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime == null ? null : updateTime.trim();
    }

    public String getAccountUser() {
        return accountUser;
    }

    public void setAccountUser(String accountUser) {
        this.accountUser = accountUser == null ? null : accountUser.trim();
    }

    public String getAccountTime() {
        return accountTime;
    }

    public void setAccountTime(String accountTime) {
        this.accountTime = accountTime == null ? null : accountTime.trim();
    }

    public BigDecimal getParValue() {
        return parValue;
    }

    public void setParValue(BigDecimal parValue) {
        this.parValue = parValue;
    }

    public String getFwdIrc() {
        return fwdIrc;
    }

    public void setFwdIrc(String fwdIrc) {
        this.fwdIrc = fwdIrc == null ? null : fwdIrc.trim();
    }

    public String getDisIrc() {
        return disIrc;
    }

    public void setDisIrc(String disIrc) {
        this.disIrc = disIrc == null ? null : disIrc.trim();
    }

    public BigDecimal getCoupon() {
        return coupon;
    }

    public void setCoupon(BigDecimal coupon) {
        this.coupon = coupon;
    }

    public String getPreviousVersionMtrDate() {
        return previousVersionMtrDate;
    }

    public void setPreviousVersionMtrDate(String previousVersionMtrDate) {
        this.previousVersionMtrDate = previousVersionMtrDate == null ? null : previousVersionMtrDate.trim();
    }

    public String getGrpId() {
        return grpId;
    }

    public void setGrpId(String grpId) {
        this.grpId = grpId == null ? null : grpId.trim();
    }

    public Short getTermDay() {
        return termDay;
    }

    public void setTermDay(Short termDay) {
        this.termDay = termDay;
    }

    public Short getRemainTermDay() {
        return remainTermDay;
    }

    public void setRemainTermDay(Short remainTermDay) {
        this.remainTermDay = remainTermDay;
    }

    public String getWarrantorId() {
        return warrantorId;
    }

    public void setWarrantorId(String warrantorId) {
        this.warrantorId = warrantorId == null ? null : warrantorId.trim();
    }

    public BigDecimal getIssueVolume() {
        return issueVolume;
    }

    public void setIssueVolume(BigDecimal issueVolume) {
        this.issueVolume = issueVolume;
    }

    public BigDecimal getIssuerId() {
        return issuerId;
    }

    public void setIssuerId(BigDecimal issuerId) {
        this.issuerId = issuerId;
    }

    public BigDecimal getiId() {
        return iId;
    }

    public void setiId(BigDecimal iId) {
        this.iId = iId;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state == null ? null : state.trim();
    }

    public String getbActualMtrDate() {
        return bActualMtrDate;
    }

    public void setbActualMtrDate(String bActualMtrDate) {
        this.bActualMtrDate = bActualMtrDate == null ? null : bActualMtrDate.trim();
    }

    public String getqCurrency() {
        return qCurrency;
    }

    public void setqCurrency(String qCurrency) {
        this.qCurrency = qCurrency == null ? null : qCurrency.trim();
    }

    public String getIsSpvAsset() {
        return isSpvAsset;
    }

    public void setIsSpvAsset(String isSpvAsset) {
        this.isSpvAsset = isSpvAsset == null ? null : isSpvAsset.trim();
    }

    public String getRealICode() {
        return realICode;
    }

    public void setRealICode(String realICode) {
        this.realICode = realICode == null ? null : realICode.trim();
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate == null ? null : startDate.trim();
    }

    public BigDecimal getPrincipal() {
        return principal;
    }

    public void setPrincipal(BigDecimal principal) {
        this.principal = principal;
    }

    public String getFirstPaymentDate() {
        return firstPaymentDate;
    }

    public void setFirstPaymentDate(String firstPaymentDate) {
        this.firstPaymentDate = firstPaymentDate == null ? null : firstPaymentDate.trim();
    }

    public String getDaycount() {
        return daycount;
    }

    public void setDaycount(String daycount) {
        this.daycount = daycount == null ? null : daycount.trim();
    }

    public String getMatchCode() {
        return matchCode;
    }

    public void setMatchCode(String matchCode) {
        this.matchCode = matchCode == null ? null : matchCode.trim();
    }

    @Override
    public InstrumentInfo clone() throws CloneNotSupportedException {

        return this.deepClone();
        //return (InstrumentInfo) super.clone();
    }

    private InstrumentInfo deepClone() {
        InstrumentInfo instrumentInfo = null;
        ByteArrayOutputStream baos = null;
        ObjectOutputStream oos = null;
        ByteArrayInputStream bais = null;
        ObjectInputStream ois = null;
        try {
            baos = new ByteArrayOutputStream();
            oos = new ObjectOutputStream(baos);
            oos.writeObject(this);

            bais = new ByteArrayInputStream(baos.toByteArray());
            ois = new ObjectInputStream(bais);
            instrumentInfo = (InstrumentInfo) ois.readObject();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } finally {
            try {
                baos.close();
                oos.flush();
                oos.close();
                bais.close();
                ois.close();
            } catch (IOException e) {
                e.printStackTrace();
            }

        }
        return instrumentInfo;
    }

}